import { INestApplication } from '@nestjs/common';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
function initSwagger (app :INestApplication){
  const options = new DocumentBuilder()
  .setTitle('NYF')
  .addApiKey({name: 'Authorization',type: 'http',in: 'Header',scheme: 'Bearer',bearerFormat: 'JWT',},'token') 
  .setVersion('1.0') 
  .build();
const document = SwaggerModule.createDocument(app, options,{
  operationIdFactory: (controllerKey: string, methodKey: string) => methodKey,
  include: [],
});
SwaggerModule.setup('api', app, document);
}
export default initSwagger